apiVersion: kubeadm.k8s.io/v1beta4
bootstrapTokens:
- groups:
  - system:bootstrappers:kubeadm:default-node-token
  token: abcdef.0123456789abcdef
  ttl: 24h0m0s
  usages:
  - signing
  - authentication
kind: InitConfiguration
certificateKey: {{ certificate_key }}
localAPIEndpoint:
  advertiseAddress: {{ CURRENT_HOST_IP }}
  bindPort: 6443
nodeRegistration:
  imagePullPolicy: IfNotPresent
  imagePullSerial: true
  name: {{ inventory_hostname }}
  taints: null
timeouts:
  controlPlaneComponentHealthCheck: 4m0s
  discovery: 5m0s
  etcdAPICall: 2m0s
  kubeletHealthCheck: 4m0s
  kubernetesAPICall: 1m0s
  tlsBootstrap: 5m0s
  upgradeManifests: 5m0s
---
apiServer: 
  certSANs:
  - localhost
  - kubernetes
  - kubernetes.default
  - kubernetes.default.svc
  - kubernetes.default.svc.cluster
  - kubernetes.default.svc.cluster.local
  - 127.0.0.1
  - 0:0:0:0:0:0:0:1
  - {{ KUBERNETES_SERVICE_IP }}
{% if lb_kube_apiserver_ip is defined %}
  - {{ lb_kube_apiserver_ip | trim }}
{% endif %}
{% for host in (groups['masters'] | default([])) | unique %}
  - {{ hostvars[host]['ansible_host'] }}
{% endfor %}
apiVersion: kubeadm.k8s.io/v1beta4
caCertificateValidityPeriod: 87600h0m0s
certificateValidityPeriod: "{{certs_expired|int * 24}}h0m0s"
certificatesDir: /etc/kubernetes/pki
clusterName: kubernetes
{% if groups['masters'] | length > 1 %}
controlPlaneEndpoint: {{ CONTROL_PLANE_ENDPOINT }}
{% endif %}
controllerManager: {}
dns: {}
encryptionAlgorithm: RSA-2048
etcd:
  local:
    dataDir: /var/lib/etcd
imageRepository: registry.k8s.io
kind: ClusterConfiguration
kubernetesVersion: {{ kubernetes_version }}
networking:
  dnsDomain: cluster.local
  podSubnet: {{ pod_cidr }}
  serviceSubnet: {{ service_cidr }}
proxy: {}
scheduler: {}